<div class="maindisplay tonerfinder">
  
	<h2>Ink and Toner Finder</h2>
	<div class="mblock clearfix partnumber">
	    <div class="lblock">
                <form name="printcartridgesearch" id="printcartridgesearch" action="<?php echo SITEURL; ?>index.php?printcartridgesearch" method="post" class="clearfix">
	        Cartridge Number
	        <div class="numberinput">
	            <input name="cartridgeno" id="cartridgeno" type="text" class="number" /> <input type="submit" value="GO" />
	        </div>
                </form>
	    </div>
	    <div class="rblock">
                <form name="printmodelsearch" id="printmodelsearch" action="<?php echo SITEURL; ?>index.php?printmodelsearch" method="post" class="clearfix">
	        Printer Model Number
	        <div class="numberinput">
	            <input name="modelno" id="modelno" type="text" class="number" /> <input type="submit" value="GO" />
	        </div>
                </form>
	    </div>
	    <div class="cblock">
	        OR
	    </div>
	</div>
        <form action="<?php echo SITEURL ?>index.php/?printsearch" name="brandsearch" id="brandsearch" method="post">
	<h2>Search by Brand</h2>
	<p>To get you started, select the brand name of your printer, copier, fax machine, or all-in-one below:</p>
	<div class="mblock clearfix brandname">
	    <div class="lblock"><input type="hidden" name="brand" id="brand">
                <?php foreach($brandarr as $brand):?>
                 <?php
                $filePath= DOCROOT."images/brands/".  $brand["brand"].".gif";
                $imagepath=SITEURL."images/brands/".  $brand["brand"].".gif";
                ?>
	        <a onclick="getproductidforbrandsearch(this.rel)" id="printbrand"  rel="<?php echo $brand["brand"]; ?>" href="#">
               <?php if(!file_exists($filePath)):?>
                 <?php echo $brand["brand"]; ?>
               <?php else: ?>
                  <img src="<?php echo $imagepath ?>" border="0" >
               <?php endif;?>
                </a>
	       <?php endforeach;?>
	        
	    </div>
	    <div class="rblock">
                <?php if($prodbybrandarr) : ?>
                <?php foreach($prodbybrandarr as $arr):?>
	        <a href="<?php echo SITEURL ?>index.php/?details/<?php echo$arr["productid"] ?>">
                <?php echo $arr["item_code"] ?></a>
                <?php endforeach;?>
	     <?php endif;?>
	    </div>
	</div>
        </form>
</div>
 
<script type="text/javascript">

    function getproductidforbrandsearch(brand)
{
    $("#brand").val(brand);
    document.brandsearch.submit();
    
	 
}


</script>